3.53 \(\int \frac {(2+3 x+5 x^2)^2}{(3-x+2 x^2)^3} \, dx\)

Optimal. Leaf size=64 \[ \frac {121 (19-7 x)}{368 \left (2 x^2-x+3\right )^2}-\frac {55 (332 x+975)}{8464 \left (2 x^2-x+3\right )}-\frac {4330 \tan ^{-1}\left (\frac {1-4 x}{\sqrt {23}}\right )}{529 \sqrt {23}} \]

[Out]

121/368*(19-7*x)/(2*x^2-x+3)^2-55/8464*(975+332*x)/(2*x^2-x+3)-4330/12167*arctan(1/23*(1-4*x)*23^(1/2))*23^(1/
2)

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 64, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.160, Rules used = {1660, 12, 618, 204} \[ \frac {121 (19-7 x)}{368 \left (2 x^2-x+3\right )^2}-\frac {55 (332 x+975)}{8464 \left (2 x^2-x+3\right )}-\frac {4330 \tan ^{-1}\left (\frac {1-4 x}{\sqrt {23}}\right )}{529 \sqrt {23}} \]

Antiderivative was successfully verified.

[In]

Int[(2 + 3*x + 5*x^2)^2/(3 - x + 2*x^2)^3,x]

[Out]

(121*(19 - 7*x))/(368*(3 - x + 2*x^2)^2) - (55*(975 + 332*x))/(8464*(3 - x + 2*x^2)) - (4330*ArcTan[(1 - 4*x)/
Sqrt[23]])/(529*Sqrt[23])

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 1660

Int[(Pq_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq, a + b*x + c*
x^2, x], f = Coeff[PolynomialRemainder[Pq, a + b*x + c*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + b
*x + c*x^2, x], x, 1]}, Simp[((b*f - 2*a*g + (2*c*f - b*g)*x)*(a + b*x + c*x^2)^(p + 1))/((p + 1)*(b^2 - 4*a*c
)), x] + Dist[1/((p + 1)*(b^2 - 4*a*c)), Int[(a + b*x + c*x^2)^(p + 1)*ExpandToSum[(p + 1)*(b^2 - 4*a*c)*Q - (
2*p + 3)*(2*c*f - b*g), x], x], x]] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && NeQ[b^2 - 4*a*c, 0] && LtQ[p, -1
]

Rubi steps

\begin {align*} \int \frac {\left (2+3 x+5 x^2\right )^2}{\left (3-x+2 x^2\right )^3} \, dx &=\frac {121 (19-7 x)}{368 \left (3-x+2 x^2\right )^2}+\frac {1}{46} \int \frac {-\frac {195}{8}+\frac {1955 x}{2}+575 x^2}{\left (3-x+2 x^2\right )^2} \, dx\\ &=\frac {121 (19-7 x)}{368 \left (3-x+2 x^2\right )^2}-\frac {55 (975+332 x)}{8464 \left (3-x+2 x^2\right )}+\frac {\int \frac {4330}{3-x+2 x^2} \, dx}{1058}\\ &=\frac {121 (19-7 x)}{368 \left (3-x+2 x^2\right )^2}-\frac {55 (975+332 x)}{8464 \left (3-x+2 x^2\right )}+\frac {2165}{529} \int \frac {1}{3-x+2 x^2} \, dx\\ &=\frac {121 (19-7 x)}{368 \left (3-x+2 x^2\right )^2}-\frac {55 (975+332 x)}{8464 \left (3-x+2 x^2\right )}-\frac {4330}{529} \operatorname {Subst}\left (\int \frac {1}{-23-x^2} \, dx,x,-1+4 x\right )\\ &=\frac {121 (19-7 x)}{368 \left (3-x+2 x^2\right )^2}-\frac {55 (975+332 x)}{8464 \left (3-x+2 x^2\right )}-\frac {4330 \tan ^{-1}\left (\frac {1-4 x}{\sqrt {23}}\right )}{529 \sqrt {23}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 51, normalized size = 0.80 \[ \frac {4330 \tan ^{-1}\left (\frac {4 x-1}{\sqrt {23}}\right )}{529 \sqrt {23}}-\frac {11 \left (1660 x^3+4045 x^2+938 x+4909\right )}{4232 \left (-2 x^2+x-3\right )^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(2 + 3*x + 5*x^2)^2/(3 - x + 2*x^2)^3,x]

[Out]

(-11*(4909 + 938*x + 4045*x^2 + 1660*x^3))/(4232*(-3 + x - 2*x^2)^2) + (4330*ArcTan[(-1 + 4*x)/Sqrt[23]])/(529
*Sqrt[23])

________________________________________________________________________________________

fricas [A]  time = 0.87, size = 75, normalized size = 1.17 \[ -\frac {419980 \, x^{3} - 34640 \, \sqrt {23} {\left (4 \, x^{4} - 4 \, x^{3} + 13 \, x^{2} - 6 \, x + 9\right )} \arctan \left (\frac {1}{23} \, \sqrt {23} {\left (4 \, x - 1\right )}\right ) + 1023385 \, x^{2} + 237314 \, x + 1241977}{97336 \, {\left (4 \, x^{4} - 4 \, x^{3} + 13 \, x^{2} - 6 \, x + 9\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x^2+3*x+2)^2/(2*x^2-x+3)^3,x, algorithm="fricas")

[Out]

-1/97336*(419980*x^3 - 34640*sqrt(23)*(4*x^4 - 4*x^3 + 13*x^2 - 6*x + 9)*arctan(1/23*sqrt(23)*(4*x - 1)) + 102
3385*x^2 + 237314*x + 1241977)/(4*x^4 - 4*x^3 + 13*x^2 - 6*x + 9)

________________________________________________________________________________________

giac [A]  time = 0.19, size = 46, normalized size = 0.72 \[ \frac {4330}{12167} \, \sqrt {23} \arctan \left (\frac {1}{23} \, \sqrt {23} {\left (4 \, x - 1\right )}\right ) - \frac {11 \, {\left (1660 \, x^{3} + 4045 \, x^{2} + 938 \, x + 4909\right )}}{4232 \, {\left (2 \, x^{2} - x + 3\right )}^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x^2+3*x+2)^2/(2*x^2-x+3)^3,x, algorithm="giac")

[Out]

4330/12167*sqrt(23)*arctan(1/23*sqrt(23)*(4*x - 1)) - 11/4232*(1660*x^3 + 4045*x^2 + 938*x + 4909)/(2*x^2 - x
+ 3)^2

________________________________________________________________________________________

maple [A]  time = 0.01, size = 47, normalized size = 0.73 \[ \frac {4330 \sqrt {23}\, \arctan \left (\frac {\left (4 x -1\right ) \sqrt {23}}{23}\right )}{12167}+\frac {-\frac {4565}{1058} x^{3}-\frac {44495}{4232} x^{2}-\frac {5159}{2116} x -\frac {53999}{4232}}{\left (2 x^{2}-x +3\right )^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((5*x^2+3*x+2)^2/(2*x^2-x+3)^3,x)

[Out]

4*(-4565/4232*x^3-44495/16928*x^2-5159/8464*x-53999/16928)/(2*x^2-x+3)^2+4330/12167*23^(1/2)*arctan(1/23*(4*x-
1)*23^(1/2))

________________________________________________________________________________________

maxima [A]  time = 0.96, size = 56, normalized size = 0.88 \[ \frac {4330}{12167} \, \sqrt {23} \arctan \left (\frac {1}{23} \, \sqrt {23} {\left (4 \, x - 1\right )}\right ) - \frac {11 \, {\left (1660 \, x^{3} + 4045 \, x^{2} + 938 \, x + 4909\right )}}{4232 \, {\left (4 \, x^{4} - 4 \, x^{3} + 13 \, x^{2} - 6 \, x + 9\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x^2+3*x+2)^2/(2*x^2-x+3)^3,x, algorithm="maxima")

[Out]

4330/12167*sqrt(23)*arctan(1/23*sqrt(23)*(4*x - 1)) - 11/4232*(1660*x^3 + 4045*x^2 + 938*x + 4909)/(4*x^4 - 4*
x^3 + 13*x^2 - 6*x + 9)

________________________________________________________________________________________

mupad [B]  time = 3.47, size = 56, normalized size = 0.88 \[ \frac {4330\,\sqrt {23}\,\mathrm {atan}\left (\frac {4\,\sqrt {23}\,x}{23}-\frac {\sqrt {23}}{23}\right )}{12167}-\frac {\frac {4565\,x^3}{4232}+\frac {44495\,x^2}{16928}+\frac {5159\,x}{8464}+\frac {53999}{16928}}{x^4-x^3+\frac {13\,x^2}{4}-\frac {3\,x}{2}+\frac {9}{4}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((3*x + 5*x^2 + 2)^2/(2*x^2 - x + 3)^3,x)

[Out]

(4330*23^(1/2)*atan((4*23^(1/2)*x)/23 - 23^(1/2)/23))/12167 - ((5159*x)/8464 + (44495*x^2)/16928 + (4565*x^3)/
4232 + 53999/16928)/((13*x^2)/4 - (3*x)/2 - x^3 + x^4 + 9/4)

________________________________________________________________________________________

sympy [A]  time = 0.20, size = 63, normalized size = 0.98 \[ \frac {- 18260 x^{3} - 44495 x^{2} - 10318 x - 53999}{16928 x^{4} - 16928 x^{3} + 55016 x^{2} - 25392 x + 38088} + \frac {4330 \sqrt {23} \operatorname {atan}{\left (\frac {4 \sqrt {23} x}{23} - \frac {\sqrt {23}}{23} \right )}}{12167} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x**2+3*x+2)**2/(2*x**2-x+3)**3,x)

[Out]

(-18260*x**3 - 44495*x**2 - 10318*x - 53999)/(16928*x**4 - 16928*x**3 + 55016*x**2 - 25392*x + 38088) + 4330*s
qrt(23)*atan(4*sqrt(23)*x/23 - sqrt(23)/23)/12167

________________________________________________________________________________________